<?php include COMMON_PATH.'/index/header.html' ?>

<div class="pr-add-wrap main-content">
    <div class="pr-top-wrap clearfix">
        <div class="left-title">企业人员列表</div>
        <span>培训设置</span>

    </div>
    <form class="layui-form pr-main-content clearfix">
        <div class="left-box fl">
            <div class="s-check-wrap">
                <input type="checkbox" name="s-checkbox" lay-filter="s-checkbox" lay-skin="primary" title="全选">
            </div>
            <div id="search-wrap">
                <div class="layui-inline">
                    <input class="ser-input" type="text" placeholder="搜索员工">
                </div>
                <span id="search_submit" class="">搜索</span>
            </div>
            <h3 class="bot-title">企业人员列表</h3>
            <ul id="staff-company" class="staff-member-wrap" style="overflow: auto; height:360px">
                <?php foreach($users['lists'] as $v):?>
                <li data-udid="<?=$v['udid']?>"
                <?php foreach($prior['users'] as $u):?><?php if($v['udid'] == $u['udid']):?>
                class="active"<?php endif;?><?php endforeach;?>><?=$v['nickname']?>&nbsp;&nbsp;<?=$v['section']?></li>
                <?php endforeach;?>
            </ul>
        </div>
        <div class="right-box fr">
            <div class="clearfix item-wrap">
                <b>课程名称：<input type="hidden" value="<?=$prior['live']['llid']?>" name="llid"></b>
                <div class="layui-block item"><input class="layui-input" name="name" type="text"
                                                     value="<?=$prior['live']['name']?>" placeholder="培训名称"></div>
            </div>
            <div class="clearfix item-wrap">
                <b>课程分类：</b>
                <div class="layui-block item">
                    <select class="layui-input" name="gid" lay-verify="">
                        <?php foreach($group['lists'] as $v):?>
                        <option value="<?=$v['gid']?>"
                        <?php if($prior['live']['gid'] == $v['gid']):?>selected<?php endif;?> ><?=$v['name']?></option>
                        <?php endforeach;?>
                    </select>
                </div>
            </div>
            <div class="clearfix item-wrap">
                <b>开播日期：</b>
                <div class="layui-inline item"><input class="layui-input" readonly="readonly" name="date"
                                                      id="advance_date" placeholder="开播日期" type="text"></div>
            </div>
            <div class="clearfix item-wrap">
                <b>开播时间：</b>
                <div class="layui-inline item"><input class="layui-input" name="start_time" type="text"
                                                      id="advance_time_start" readonly="readonly" placeholder="开始时间"/>
                </div>&nbsp;&nbsp;至&nbsp;&nbsp;<div class="layui-inline item"><input class="layui-input"
                                                                                     readonly="readonly" name="end_time"
                                                                                     type="text" id="advance_time_end"
                                                                                     placeholder="结束时间"/></div>
            </div>
            <div class="clearfix item-wrap">
                <b>培训对象：</b>
                <?php $udid=$pid=[]?>
                <?php if($prior['users']):?>
                <?php foreach($prior['users'] as $v):?>
                <?php $udid[] = $v['udid'];?>
                <?php $nickname = $nickname.$v['nickname'].'  ；'?>
                <?php endforeach;?>
                <?php endif;?>
                <?php if($prior['phones']):?>
                <?php foreach($prior['phones'] as $v):?>
                <?php $pid[] = $v['pid'];?>
                <?php $nickname = $nickname.$v['phone'].'  ；'?>
                <?php endforeach;?>
                <?php endif;?>
                <div class="staff-out-wrap">
                    <div class="layui-block item">
                        <textarea data-notify="<?=implode(',',$udid);?>" data-phone="<?=implode(',',$pid);?>"
                                  id="staff-obj" class="layui-textarea disabled" readonly=""
                                  placeholder="从左侧选择培训对象"><?=$nickname?></textarea>
                    </div>
                    <div class="layui-block item">
                        <textarea name="section" id="staff-obj-add" class="layui-textarea"
                                  placeholder="手动添加培训对象"><?=$prior['live']['section']?></textarea>
                    </div>
                </div>
            </div>
            <div class="clearfix item-wrap">
                <b>培训人数：</b>
                <div class="layui-block item"><input class="layui-input" name="number" type="text" placeholder="培训人数"
                                                     value="<?=$prior['live']['number']?>"></div>
            </div>
            <div class="clearfix item-wrap">
                <b>房间密码：</b>
                <div class="layui-block item"><input class="layui-input" name="password" autocomplete="new-password"
                                                     type="password"
                                                     value="<?php if(!empty($prior['live']['password'])):?><?=$prior['live']['password']?><?php endif;?>"
                                                     placeholder="无需密码可不填写"></div>
            </div>
            <div class="clearfix item-wrap">
                <b>课件上传：</b>
                <div class="layui-block item">
                    <a href="javascript:void(0);" id="upload_btn_wrap"> <i class="icon iconfont icon-lianjie"></i>添加图片&nbsp;|<input
                            id="upload_btn" multiple="multiple" type="file" accept="image/jpg,image/jpeg,image/png"></a>
                    <span style="display: inline-block; overflow: hidden;">已上传<i
                            id="upload-num"><?=count($prior['live']['annex'])?></i>张图片</span>
                    <i class="layui-icon layui-anim layui-anim-rotate layui-anim-loop loopNone"
                       style="height: 48px;line-height: 48px; margin-left:8px; vertical-align: top;overflow: hidden;"></i>
                    <span style="display: inline-block; overflow: hidden; margin-left: 30px;">图片命名规律：幻灯片1.jpg，幻灯片2.jpg...，每张图片不能超过2M，每次最多可选20张</span>
                    <ul data-path="" data-file="" class="pic-list clearfix">
                        <?php foreach($prior['live']['annex'] as $v):?>
                        <li class="old" data-url="<?=$v?>">
                            <img src="<?=$v?>">
                            <div class="info-card">
                                <p>图片名字</p>
                                <p><span class="pic-size">已上传</span> <i style="cursor: pointer;" class="pic-del">删除</i>
                                </p>
                            </div>
                        </li>
                        <?php endforeach;?>
                    </ul>
                </div>

            </div>

            <div class="clearfix item-wrap">
                <b>课程封面：</b>
                <div class="layui-block item pic-cd-wrap" style="margin-top: 0;">
                    <span data-backdrop = '"<?=json_encode($backdrop)?>"' class="cover-choose">
                        <i class="icon iconfont icon-lianjie"></i>封面选择
                    </span>
                    <img class="pic-cd" src="" alt="">
                </div>
            </div>


            <div class="clearfix item-wrap">
                <b>课后考卷：</b>
                <div class="layui-block item">
                    <input type="radio" name="volume" value="0" title="不需要" <?php if(empty($prior['live']['volume'])):?>
                    checked<?php endif;?>>
                    <input type="radio" name="volume" value="1" title="需要" <?php if(!empty($prior['live']['volume'])):?>
                    checked<?php endif;?>>
                </div>
            </div>
            <div class="clearfix item-wrap">
                <b>直播分享：</b>
                <div class="layui-block item">
                    <input type="radio" name="share" value="1" title="允许" <?php if(!empty($prior['live']['share'])):?>
                    checked<?php endif;?>>
                    <input type="radio" name="share" value="0" title="禁止" <?php if(empty($prior['live']['share'])):?>
                    checked<?php endif;?>>
                </div>
            </div>
            <div class="clearfix item-wrap">
                <b>直播课件：</b>
                <div class="layui-block item">
                    <input type="radio" name="view" value="1" title="允许" <?php if(!empty($prior['live']['view'])):?>
                    checked<?php endif;?>>
                    <input type="radio" name="view" value="0" title="禁止" <?php if(empty($prior['live']['view'])):?>
                    checked<?php endif;?>>
                </div>
            </div>
            <div class="clearfix item-wrap">
                <b>课程简介：</b>
                <div class="layui-block item"><textarea name="introduction" id="" placeholder="课程简介"
                                                        class="layui-textarea"><?=$prior['live']['introduction']?></textarea>
                </div>
            </div>
            <span lay-submit lay-filter="submit" class="fr btn-submit">提交</span>
        </div>
        <input data-start="<?=$prior['live']['date']?>" data-timestart="<?=$prior['live']['start_time']?>" data-imgsrc="<?=$imgPath?>" data-timeend="<?=$prior['live']['end_time']?>" class="prior_type" type="hidden" value="2">
    </form>
</div>

//图片提交
Backdrop/add
参数
file
path
status(请写2)
//图片输出
<?php foreach($backdrop as $v):?>
<img src="<?=$v['image']?>" alt="<?=$v['bid']?>" width="128">
<?php endforeach;?>

<?php include COMMON_PATH.'/index/footer.html' ?>
<script type="text/javascript" src="/index/js/prior_edit.js"></script>
<script>
    navActive(5);

</script>
</html>



















